from oauth2client.appengine import CredentialsProperty
from google.appengine.ext import db

class Shout(db.Model):
    user = db.UserProperty()
    message = db.StringProperty(required=True)
    when = db.DateTimeProperty(auto_now_add=True)

class UserAccount(db.Model):
    user = db.UserProperty()
    # registered services
    buzz = db.BooleanProperty(default=False)
    twitter = db.BooleanProperty(default=False)
    weibo = db.BooleanProperty(default=False)
    facebook = db.BooleanProperty(default=False)
    # credentials
    buzz_credentials = CredentialsProperty()
    twitter_credentials = CredentialsProperty()
    weibo_credentials = CredentialsProperty()
    facebook_credentials = CredentialsProperty()

class Session(object):
    def __init__(self, targets, message):
        self.targets = targets
        self.message = message
